//1.导入{}中定义的变量
import {flag, sum} from "./index1.js";

if(flag){
  console.log("刘备");
  console.log(sum(1, 2));
}

//2.直接导入export
import {age} from './index1.js';

console.log(age);

//3.导入export的function
import {mul, Person} from './index1.js';

console.log(mul(3, 4));

const person = new Person();
person.run();

//4.默认导出
import addr from './index1.js';

addr('参数');

//5.全部导入
import * as aaa from './index1.js';

console.log(aaa);
